package com.hlhj.carview.http

import android.content.Context
import com.example.mymvp.log
import com.example.mymvp.okrx.BaseAciton
import com.hlhj.carview.BaseAty
import com.hlhj.carview.utils.LoadingUtil
import io.reactivex.disposables.Disposable

/**
 * Created by Never Fear   on 2018\12\18 0018.
Never More....
 */
abstract class CustomAction<T>(private val c:Context):BaseAciton<T> {
    override fun onSubscribe(d: Disposable) {
        if (c is BaseAty<*,*>){
            c.addDisable(d)
        }
    }

    override fun onComplete() {
        LoadingUtil.diss()
    }

    override fun acheSuccess(t: T) {

    }

    override fun httpFailed(e: Throwable?) {

    }

}